<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="/css/mystyle.css">
    <title>11</title>
</head>
<body>
<div th:fragment="head">
    <div class="top" style="top: 0;left: 0;right: 0; position: fixed;z-index: 10;margin-bottom: 10px">
        <el-container>
            <el-header>
                <div style="display: flex;justify-content:space-between">
                    <a href=/api/public/goHome>
                        博客网
                    </a>
                    <div>
                            <span th:if="${session.SPRING_SECURITY_CONTEXT}==null">
                                <a class="a" type="info" href=/api/public/goHome>
                                首页
                                |
                                </a>
                                <a class="a" href=/api/public/go2Login>
                                     登录/注册
                                    |
                                </a>
                            </span>
                        <div th:if="${session.SPRING_SECURITY_CONTEXT}!=null">
                                <span th:text="当前用户 + ' : ' +
                                ${session.SPRING_SECURITY_CONTEXT.authentication.principal.nickname}">
                                </span>
                            <a class="a" type="info" href=/api/public/goHome>
                                首页
                                |
                            </a>
                            <a class="a" href=/api/user/go2FindInfo>
                                我的个人中心
                                |
                            </a>
                            <a class="a" @click="outLogin()" href=/api/public/outLogin>
                                退出登录
                            </a>
                        </div>
                    </div>
                </div>
            </el-header>
        </el-container>
        <div style="margin: 10px"></div>
    </div>
</div>
</body>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            isLogin: false,
            user: {}
        },
        methods: {
            outLogin() {
                sessionStorage.clear()
                localStorage.clear()
            },
        },
        mounted() {
        }
    })
</script>
</html>